package com.zhaorujie.rpc.core.remoting.params;

import java.io.Serializable;

/**
 * @author 赵汝杰
 * @version v1.0
 * @description RpcResponse
 * @date 2024/3/5
 **/
public class RpcResponse implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 请求id
     */
    private String requestId;
    /**
     * 错误信息
     */
    private Throwable throwable;
    /**
     * 响应结果
     */
    private Object result;

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public Throwable getThrowable() {
        return throwable;
    }

    public void setThrowable(Throwable throwable) {
        this.throwable = throwable;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "RpcResponse{" +
                "requestId='" + requestId + '\'' +
                ", throwable=" + throwable +
                ", result=" + result +
                '}';
    }
}
